﻿using CloudDcPc.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CloudDcPc
{
    /// <summary>
    /// CosSelDlg.xaml 的交互逻辑
    /// </summary>
    public partial class CosSelDlg : Window
    {
        List<int> list_tab_num = null;
        public CosSelDlg(List<int> list_tab_num)
        {
            InitializeComponent();
            this.list_tab_num = list_tab_num;

            List<Tab> list_tabs = new List<Tab>();
            list_tabs = App.TabBean.GetTabsByField("status", "3");
            list_tabs_xml.ItemsSource = list_tabs;
            list_tabs_xml.DisplayMemberPath = "Name";
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            list_tab_num.Clear();
            foreach (Tab t in list_tabs_xml.SelectedItems)
            {
                list_tab_num.Add(t.Tab_num);
            }
            this.Close();
        }
    }
}
